#ifndef GAMEMODEL_H
#define GAMEMODEL_H

#include<vector>
 enum GameType
 {
     AI,
     MAN
 };
 enum GameStatus
 {
     PLAYING,
     WIN,
     DEAD
 };
const int BOARD_GRAD_SIZE=15;
const int MARGIN=30;
const int CHESS_RADIUS=15;
const int MARK_SIZE=6;
const int BLOCK_SIZE=40;
const int POS_OFFSET=BLOCK_SIZE*0.4;
const int AI_THINK_TIME=700;

class GameModel
{
public:
    GameModel();
public:
    std::vector<std::vector<int>>gameMapVec;
    std::vector<std::vector<int>>scoreMapVec;

    bool playerFlag;

    GameType gameType;
    GameStatus gameStaus;   
    void startGame(GameType type);


    void calculateScore();
    void actionByPerson(int row,int col);
    void actionByAI(int &clickRow,int &clickCol);
    void updateGameMap(int row,int col);
    bool isWin(int row,int col);
    bool isDeadGame();

};







#endif // GAMEMODEL_H
